<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span>
</span><span id="line-2"></span><span class="hs-comment">-- | Types for the general graph colorer.</span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Data.Graph.Base</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-4"></span><span>        </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Triv"><span class="hs-identifier">Triv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-5"></span><span>        </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier">Graph</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>        </span><span class="annot"><a href="GHC.Data.Graph.Base.html#initGraph"><span class="hs-identifier">initGraph</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>        </span><span class="annot"><a href="GHC.Data.Graph.Base.html#graphMapModify"><span class="hs-identifier">graphMapModify</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span>        </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Node"><span class="hs-identifier">Node</span></a></span><span>  </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>     </span><span class="annot"><a href="GHC.Data.Graph.Base.html#newNode"><span class="hs-identifier">newNode</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span class="hs-special">)</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">where</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-comment">-- | A fn to check if a node is trivially colorable</span><span>
</span><span id="line-22"></span><span class="hs-comment">--      For graphs who's color classes are disjoint then a node is 'trivially colorable'</span><span>
</span><span id="line-23"></span><span class="hs-comment">--      when it has less neighbors and exclusions than available colors for that node.</span><span>
</span><span id="line-24"></span><span class="hs-comment">--</span><span>
</span><span id="line-25"></span><span class="hs-comment">--      For graph's who's color classes overlap, ie some colors alias other colors, then</span><span>
</span><span id="line-26"></span><span class="hs-comment">--      this can be a bit more tricky. There is a general way to calculate this, but</span><span>
</span><span id="line-27"></span><span class="hs-comment">--      it's likely be too slow for use in the code. The coloring algorithm takes</span><span>
</span><span id="line-28"></span><span class="hs-comment">--      a canned function which can be optimised by the user to be specific to the</span><span>
</span><span id="line-29"></span><span class="hs-comment">--      specific graph being colored.</span><span>
</span><span id="line-30"></span><span class="hs-comment">--</span><span>
</span><span id="line-31"></span><span class="hs-comment">--      for details, see  &quot;A Generalised Algorithm for Graph-Coloring Register Allocation&quot;</span><span>
</span><span id="line-32"></span><span class="hs-comment">--                              Smith, Ramsey, Holloway - PLDI 2004.</span><span>
</span><span id="line-33"></span><span class="hs-comment">--</span><span>
</span><span id="line-34"></span><span class="hs-keyword">type</span><span> </span><span id="Triv"><span class="annot"><a href="GHC.Data.Graph.Base.html#Triv"><span class="hs-identifier hs-var">Triv</span></a></span></span><span> </span><span id="local-6989586621680941560"><span class="annot"><a href="#local-6989586621680941560"><span class="hs-identifier hs-type">k</span></a></span></span><span> </span><span id="local-6989586621680941559"><span class="annot"><a href="#local-6989586621680941559"><span class="hs-identifier hs-type">cls</span></a></span></span><span> </span><span id="local-6989586621680941558"><span class="annot"><a href="#local-6989586621680941558"><span class="hs-identifier hs-type">color</span></a></span></span><span>
</span><span id="line-35"></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><a href="#local-6989586621680941559"><span class="hs-identifier hs-type">cls</span></a></span><span>                  </span><span class="hs-comment">-- the class of the node we're trying to color.</span><span>
</span><span id="line-36"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941560"><span class="hs-identifier hs-type">k</span></a></span><span>            </span><span class="hs-comment">-- the node's neighbors.</span><span>
</span><span id="line-37"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941558"><span class="hs-identifier hs-type">color</span></a></span><span>        </span><span class="hs-comment">-- the node's exclusions.</span><span>
</span><span id="line-38"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-comment">-- | The Interference graph.</span><span>
</span><span id="line-42"></span><span class="hs-comment">--      There used to be more fields, but they were turfed out in a previous revision.</span><span>
</span><span id="line-43"></span><span class="hs-comment">--      maybe we'll want more later..</span><span>
</span><span id="line-44"></span><span class="hs-comment">--</span><span>
</span><span id="line-45"></span><span class="hs-keyword">data</span><span> </span><span id="Graph"><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-var">Graph</span></a></span></span><span> </span><span id="local-6989586621680941620"><span class="annot"><a href="#local-6989586621680941620"><span class="hs-identifier hs-type">k</span></a></span></span><span> </span><span id="local-6989586621680941619"><span class="annot"><a href="#local-6989586621680941619"><span class="hs-identifier hs-type">cls</span></a></span></span><span> </span><span id="local-6989586621680941618"><span class="annot"><a href="#local-6989586621680941618"><span class="hs-identifier hs-type">color</span></a></span></span><span>
</span><span id="line-46"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="Graph"><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-var">Graph</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-47"></span><span>        </span><span class="hs-comment">-- | All active nodes in the graph.</span><span>
</span><span id="line-48"></span><span>          </span><span id="graphMap"><span class="annot"><span class="annottext">forall k cls color.
Graph k cls color -&gt; UniqFM k (Node k cls color)
</span><a href="GHC.Data.Graph.Base.html#graphMap"><span class="hs-identifier hs-var hs-var">graphMap</span></a></span></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941620"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Graph.Base.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941620"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941619"><span class="hs-identifier hs-type">cls</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941618"><span class="hs-identifier hs-type">color</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-comment">-- | An empty graph.</span><span>
</span><span id="line-52"></span><span id="local-6989586621680941609"><span id="local-6989586621680941610"><span id="local-6989586621680941611"><span class="annot"><a href="GHC.Data.Graph.Base.html#initGraph"><span class="hs-identifier hs-type">initGraph</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Graph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941611"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941610"><span class="hs-identifier hs-type">cls</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941609"><span class="hs-identifier hs-type">color</span></a></span></span></span></span><span>
</span><span id="line-53"></span><span id="initGraph"><span class="annot"><span class="annottext">initGraph :: forall k cls color. Graph k cls color
</span><a href="GHC.Data.Graph.Base.html#initGraph"><span class="hs-identifier hs-var hs-var">initGraph</span></a></span></span><span>
</span><span id="line-54"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Graph :: forall k cls color.
UniqFM k (Node k cls color) -&gt; Graph k cls color
</span><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Graph</span></a></span><span>
</span><span id="line-55"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">graphMap :: UniqFM k (Node k cls color)
</span><a href="GHC.Data.Graph.Base.html#graphMap"><span class="hs-identifier hs-var">graphMap</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM k (Node k cls color)
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-comment">-- | Modify the finite map holding the nodes in the graph.</span><span>
</span><span id="line-59"></span><span id="local-6989586621680941601"><span id="local-6989586621680941602"><span id="local-6989586621680941603"><span class="annot"><a href="GHC.Data.Graph.Base.html#graphMapModify"><span class="hs-identifier hs-type">graphMapModify</span></a></span><span>
</span><span id="line-60"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941603"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Graph.Base.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941603"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941602"><span class="hs-identifier hs-type">cls</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941601"><span class="hs-identifier hs-type">color</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941603"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Graph.Base.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941603"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941602"><span class="hs-identifier hs-type">cls</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941601"><span class="hs-identifier hs-type">color</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Graph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941603"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941602"><span class="hs-identifier hs-type">cls</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941601"><span class="hs-identifier hs-type">color</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Graph"><span class="hs-identifier hs-type">Graph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941603"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941602"><span class="hs-identifier hs-type">cls</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941601"><span class="hs-identifier hs-type">color</span></a></span></span></span></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span id="graphMapModify"><span class="annot"><span class="annottext">graphMapModify :: forall k cls color.
(UniqFM k (Node k cls color) -&gt; UniqFM k (Node k cls color))
-&gt; Graph k cls color -&gt; Graph k cls color
</span><a href="GHC.Data.Graph.Base.html#graphMapModify"><span class="hs-identifier hs-var hs-var">graphMapModify</span></a></span></span><span> </span><span id="local-6989586621680941554"><span class="annot"><span class="annottext">UniqFM k (Node k cls color) -&gt; UniqFM k (Node k cls color)
</span><a href="#local-6989586621680941554"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680941553"><span class="annot"><span class="annottext">Graph k cls color
</span><a href="#local-6989586621680941553"><span class="hs-identifier hs-var">graph</span></a></span></span><span>
</span><span id="line-64"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Graph k cls color
</span><a href="#local-6989586621680941553"><span class="hs-identifier hs-var">graph</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">graphMap :: UniqFM k (Node k cls color)
</span><a href="GHC.Data.Graph.Base.html#graphMap"><span class="hs-identifier hs-var">graphMap</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM k (Node k cls color) -&gt; UniqFM k (Node k cls color)
</span><a href="#local-6989586621680941554"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Graph k cls color -&gt; UniqFM k (Node k cls color)
forall k cls color.
Graph k cls color -&gt; UniqFM k (Node k cls color)
</span><a href="GHC.Data.Graph.Base.html#graphMap"><span class="hs-identifier hs-var hs-var">graphMap</span></a></span><span> </span><span class="annot"><span class="annottext">Graph k cls color
</span><a href="#local-6989586621680941553"><span class="hs-identifier hs-var">graph</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-comment">-- | Graph nodes.</span><span>
</span><span id="line-69"></span><span class="hs-comment">--      Represents a thing that can conflict with another thing.</span><span>
</span><span id="line-70"></span><span class="hs-comment">--      For the register allocater the nodes represent registers.</span><span>
</span><span id="line-71"></span><span class="hs-comment">--</span><span>
</span><span id="line-72"></span><span class="hs-keyword">data</span><span> </span><span id="Node"><span class="annot"><a href="GHC.Data.Graph.Base.html#Node"><span class="hs-identifier hs-var">Node</span></a></span></span><span> </span><span id="local-6989586621680941597"><span class="annot"><a href="#local-6989586621680941597"><span class="hs-identifier hs-type">k</span></a></span></span><span> </span><span id="local-6989586621680941596"><span class="annot"><a href="#local-6989586621680941596"><span class="hs-identifier hs-type">cls</span></a></span></span><span> </span><span id="local-6989586621680941595"><span class="annot"><a href="#local-6989586621680941595"><span class="hs-identifier hs-type">color</span></a></span></span><span>
</span><span id="line-73"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="Node"><span class="annot"><a href="GHC.Data.Graph.Base.html#Node"><span class="hs-identifier hs-var">Node</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-74"></span><span>        </span><span class="hs-comment">-- | A unique identifier for this node.</span><span>
</span><span id="line-75"></span><span>          </span><span id="nodeId"><span class="annot"><span class="annottext">forall k cls color. Node k cls color -&gt; k
</span><a href="GHC.Data.Graph.Base.html#nodeId"><span class="hs-identifier hs-var hs-var">nodeId</span></a></span></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680941597"><span class="hs-identifier hs-type">k</span></a></span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span>        </span><span class="hs-comment">-- | The class of this node,</span><span>
</span><span id="line-78"></span><span>        </span><span class="hs-comment">--      determines the set of colors that can be used.</span><span>
</span><span id="line-79"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="nodeClass"><span class="annot"><span class="annottext">forall k cls color. Node k cls color -&gt; cls
</span><a href="GHC.Data.Graph.Base.html#nodeClass"><span class="hs-identifier hs-var hs-var">nodeClass</span></a></span></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680941596"><span class="hs-identifier hs-type">cls</span></a></span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span>        </span><span class="hs-comment">-- | The color of this node, if any.</span><span>
</span><span id="line-82"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="nodeColor"><span class="annot"><span class="annottext">forall k cls color. Node k cls color -&gt; Maybe color
</span><a href="GHC.Data.Graph.Base.html#nodeColor"><span class="hs-identifier hs-var hs-var">nodeColor</span></a></span></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941595"><span class="hs-identifier hs-type">color</span></a></span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span>        </span><span class="hs-comment">-- | Neighbors which must be colored differently to this node.</span><span>
</span><span id="line-85"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="nodeConflicts"><span class="annot"><span class="annottext">forall k cls color. Node k cls color -&gt; UniqSet k
</span><a href="GHC.Data.Graph.Base.html#nodeConflicts"><span class="hs-identifier hs-var hs-var">nodeConflicts</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941597"><span class="hs-identifier hs-type">k</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span>        </span><span class="hs-comment">-- | Colors that cannot be used by this node.</span><span>
</span><span id="line-88"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="nodeExclusions"><span class="annot"><span class="annottext">forall k cls color. Node k cls color -&gt; UniqSet color
</span><a href="GHC.Data.Graph.Base.html#nodeExclusions"><span class="hs-identifier hs-var hs-var">nodeExclusions</span></a></span></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941595"><span class="hs-identifier hs-type">color</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span>        </span><span class="hs-comment">-- | Colors that this node would prefer to be, in descending order.</span><span>
</span><span id="line-91"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="nodePreference"><span class="annot"><span class="annottext">forall k cls color. Node k cls color -&gt; [color]
</span><a href="GHC.Data.Graph.Base.html#nodePreference"><span class="hs-identifier hs-var hs-var">nodePreference</span></a></span></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680941595"><span class="hs-identifier hs-type">color</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span>        </span><span class="hs-comment">-- | Neighbors that this node would like to be colored the same as.</span><span>
</span><span id="line-94"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="nodeCoalesce"><span class="annot"><span class="annottext">forall k cls color. Node k cls color -&gt; UniqSet k
</span><a href="GHC.Data.Graph.Base.html#nodeCoalesce"><span class="hs-identifier hs-var hs-var">nodeCoalesce</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941597"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span class="hs-comment">-- | An empty node.</span><span>
</span><span id="line-98"></span><span id="local-6989586621680941570"><span id="local-6989586621680941571"><span id="local-6989586621680941572"><span class="annot"><a href="GHC.Data.Graph.Base.html#newNode"><span class="hs-identifier hs-type">newNode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680941572"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680941571"><span class="hs-identifier hs-type">cls</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Base.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941572"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941571"><span class="hs-identifier hs-type">cls</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680941570"><span class="hs-identifier hs-type">color</span></a></span></span></span></span><span>
</span><span id="line-99"></span><span id="newNode"><span class="annot"><span class="annottext">newNode :: forall k cls color. k -&gt; cls -&gt; Node k cls color
</span><a href="GHC.Data.Graph.Base.html#newNode"><span class="hs-identifier hs-var hs-var">newNode</span></a></span></span><span> </span><span id="local-6989586621680941544"><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680941544"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680941543"><span class="annot"><span class="annottext">cls
</span><a href="#local-6989586621680941543"><span class="hs-identifier hs-var">cls</span></a></span></span><span>
</span><span id="line-100"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Node :: forall k cls color.
k
-&gt; cls
-&gt; Maybe color
-&gt; UniqSet k
-&gt; UniqSet color
-&gt; [color]
-&gt; UniqSet k
-&gt; Node k cls color
</span><a href="GHC.Data.Graph.Base.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span>
</span><span id="line-101"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">nodeId :: k
</span><a href="GHC.Data.Graph.Base.html#nodeId"><span class="hs-identifier hs-var">nodeId</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621680941544"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-102"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">nodeClass :: cls
</span><a href="GHC.Data.Graph.Base.html#nodeClass"><span class="hs-identifier hs-var">nodeClass</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">cls
</span><a href="#local-6989586621680941543"><span class="hs-identifier hs-var">cls</span></a></span><span>
</span><span id="line-103"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">nodeColor :: Maybe color
</span><a href="GHC.Data.Graph.Base.html#nodeColor"><span class="hs-identifier hs-var">nodeColor</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe color
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-104"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">nodeConflicts :: UniqSet k
</span><a href="GHC.Data.Graph.Base.html#nodeConflicts"><span class="hs-identifier hs-var">nodeConflicts</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet k
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span>
</span><span id="line-105"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">nodeExclusions :: UniqSet color
</span><a href="GHC.Data.Graph.Base.html#nodeExclusions"><span class="hs-identifier hs-var">nodeExclusions</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet color
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span>
</span><span id="line-106"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">nodePreference :: [color]
</span><a href="GHC.Data.Graph.Base.html#nodePreference"><span class="hs-identifier hs-var">nodePreference</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-107"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">nodeCoalesce :: UniqSet k
</span><a href="GHC.Data.Graph.Base.html#nodeCoalesce"><span class="hs-identifier hs-var">nodeCoalesce</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet k
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-108"></span></pre></body></html>